home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / util / libs / graphics3d.lha / src / library / graphics3dm.s < prev    next >
Encoding:
Text File  |  1998-10-17  |  2.5 KB  |  137 lines

  1. *
  2. **      $VER: graphics3Dm.c 10.00 (03.04.98)
  3. **
  4. **      Math functions for graphics3D.library 
  5. **
  6. **    Note: this code is take from math lib sources of C Compiler VBCC 
  7. **          
  8. *
  9.  
  10. * moltiplicazione fra 2 numeri double float *
  11.  xref _MathIeeeDoubBasBase
  12.  
  13.  xdef __ieeemuld
  14. __ieeemuld:
  15.  movem.l a6/d2-d3,-(sp)
  16.  move.l  _MathIeeeDoubBasBase,a6
  17.  movem.l 16(sp),d2-d3
  18.  movem.l 24(sp),d0-d1
  19.  jsr     -78(a6)
  20.  movem.l (sp)+,a6/d2-d3
  21.  rts
  22.  
  23. * divisione fra 2 numeri double float *
  24.  xref _MathIeeeDoubBasBase
  25.  
  26.  xdef __ieeedivd
  27. __ieeedivd:
  28.  movem.l a6/d2-d3,-(sp)
  29.  move.l  _MathIeeeDoubBasBase,a6
  30.  movem.l 16(sp),d0-d1
  31.  movem.l 24(sp),d2-d3
  32.  jsr     -84(a6)
  33.  movem.l (sp)+,a6/d2-d3
  34.  rts
  35.  
  36. * somma tra 2 numeri double float *
  37.  xref _MathIeeeDoubBasBase
  38.  
  39.  xdef __ieeeaddd
  40. __ieeeaddd:
  41.  movem.l a6/d2-d3,-(sp)
  42.  move.l  _MathIeeeDoubBasBase,a6
  43.  movem.l 16(sp),d2-d3
  44.  movem.l 24(sp),d0-d1
  45.  jsr     -66(a6)
  46.  movem.l (sp)+,a6/d2-d3
  47.  rts
  48.  
  49. * sembra equivalente al fix ma non ho capito bene a cosa serve 
  50. * pero' il compilatore lo richiede  
  51.  xref _MathIeeeDoubBasBase
  52.  
  53.  xdef __ieeefltsld
  54. __ieeefltsld:
  55.  move.l  4(sp),d0
  56.  move.l  a6,-(sp)
  57.  move.l  _MathIeeeDoubBasBase,a6
  58.  jsr     -36(a6)
  59.  move.l  (sp)+,a6
  60.  rts
  61.  
  62. * restituisce parte intera di un numero double float con segno *
  63.  xref _MathIeeeDoubBasBase
  64.  
  65.  xdef __ieeefixds
  66. __ieeefixds:
  67.  movem.l 4(sp),d0-d1
  68.  move.l  a6,-(sp)
  69.  move.l  _MathIeeeDoubBasBase,a6
  70.  jsr     -30(a6)
  71.  move.l  (sp)+,a6
  72.  rts
  73.  
  74. * restituisce parte intera di un numero single float con segno *
  75.  xref _MathIeeeSingBasBase
  76.  
  77.  xdef __ieeefixls
  78. __ieeefixls:
  79.  move.l  4(sp),d0
  80.  move.l  a6,-(sp)
  81.  move.l  _MathIeeeSingBasBase,a6
  82.  jsr     -30(a6)
  83.  move.l  (sp)+,a6
  84.  rts
  85.  
  86. * moltiplicazione fra 2 numeri single float *
  87.  xref _MathIeeeSingBasBase
  88.  
  89.  xdef __ieeemull
  90. __ieeemull:
  91.  move.l a6,-(sp)
  92.  move.l  _MathIeeeSingBasBase,a6
  93.  move.l 8(sp),d1
  94.  move.l 12(sp),d0
  95.  jsr     -78(a6)
  96.  move.l (sp)+,a6
  97.  rts
  98.  
  99. * sembra equivalente al fix ma non ho capito bene a cosa serve 
  100. * pero' il compilatore lo richiede  
  101.  xref _MathIeeeSingBasBase
  102.  
  103.  xdef __ieeefltsll
  104. __ieeefltsll:
  105.  move.l  4(sp),d0
  106.  move.l  a6,-(sp)
  107.  move.l  _MathIeeeSingBasBase,a6
  108.  jsr     -36(a6)
  109.  move.l  (sp)+,a6
  110.  rts
  111.  
  112. * divisione fra 2 numeri single float *
  113.  xref _MathIeeeSingBasBase
  114.  
  115.  xdef __ieeedivl
  116. __ieeedivl:
  117.  move.l a6,-(sp)
  118.  move.l  _MathIeeeSingBasBase,a6
  119.  move.l 8(sp),d0
  120.  move.l 12(sp),d1
  121.  jsr     -84(a6)
  122.  move.l (sp)+,a6
  123.  rts
  124.  
  125. * somma tra 2 numeri single float *
  126.  xref _MathIeeeSingBasBase
  127.  
  128.  xdef __ieeeaddl
  129. __ieeeaddl:
  130.  move.l a6,-(sp)
  131.  move.l  _MathIeeeSingBasBase,a6
  132.  move.l 8(sp),d1
  133.  move.l 12(sp),d0
  134.  jsr     -66(a6)
  135.  move.l (sp)+,a6
  136.  rts
  137.